# -*- coding: utf-8 -*-
# Author: xiantingDeng
# File: execute.py
# Time: 9:48



from bin.common.element import ElementActions
from crm.page.general_page.handler import TheTransition


trans = TheTransition()

def the_transition(action:ElementActions):
    '''
    开始加载过渡页
    :param action:
    :return:
    '''
    # action.smart_click_element(trans.同意并继续按钮)
    action.click_element(trans.去允许按钮)
    action.smart_click_element(trans.权限1允许按钮)
    action.smart_click_element(trans.权限2允许按钮)
    if action.is_element_exist(trans.去设置按钮):
        action.click_element(trans.去设置按钮)
        action.send_key_event("KEYCODE_BACK") # 返回按钮
    action.click_element(trans.我的)


